package com.gitee.wsl.mathematics.geometry.d2.rect.ext

import com.gitee.wsl.mathematics.coordinate.d2.Coordinate2
import com.gitee.wsl.mathematics.geometry.d2.base.AnchorAble2d
import com.gitee.wsl.mathematics.geometry.d2.rect.RectangleShape2d

fun<N:Number,V:Coordinate2<N,V>> RectangleShape2d<N, V, *>.getAnchoredPoint(anchor: AnchorAble2d<N, *>) = createPoint2(left + width * anchor.sx, top + height * anchor.sy)